Move SIZE_FROM_LOG2_WORDS macro to utils.h
authorSoby Mathew <[email protected]>
Wed, 20 Jul 2016 13:38:36 +0000 (14:38 +0100)
committerSoby Mathew <[email protected]>
Tue, 9 Aug 2016 16:33:57 +0000 (17:33 +0100)
This patch moves the macro SIZE_FROM_LOG2_WORDS() defined in
`arch.h` to `utils.h` as it is utility macro.

Change-Id: Ia8171a226978f053a1ee4037f80142c0a4d21430

bl1/bl1_main.c
include/lib/aarch64/arch.h
include/lib/utils.h

index 3cca1769c203918e06eec9071fb58ae66f101952..cb1bc1862dd5b91ae1d0269006e6590fdfa23eb1 100644 (file)
@@ -38,6 +38,7 @@
 #include <platform.h>
 #include <platform_def.h>
 #include <smcc_helpers.h>
+#include <utils.h>
 #include "bl1_private.h"
 #include <uuid.h>
 
index 07bbd899a52a524e5d7892b01603b50dd1f09174..fa5cb12b033f2a1b6fa92a95e1f3af6403602d4d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2015, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are met:
 #define CTR_IMINLINE_MASK      0xf
 
 #define MAX_CACHE_LINE_SIZE    0x800 /* 2KB */
-#define SIZE_FROM_LOG2_WORDS(n)        (4 << (n))
-
 
 /* Physical timer control register bit fields shifts and masks */
 #define CNTP_CTL_ENABLE_SHIFT   0
index 0936cbb391c93195df3ffa8b7bad0e9fd6476b2a..a234e3c9a69659f76f73fa55bbb02f14a41c2e3e 100644 (file)
@@ -38,6 +38,8 @@
 #define IS_POWER_OF_TWO(x)                     \
        (((x) & ((x) - 1)) == 0)
 
+#define SIZE_FROM_LOG2_WORDS(n)                (4 << (n))
+
 /*
  * The round_up() macro rounds up a value to the given boundary in a
  * type-agnostic yet type-safe manner. The boundary must be a power of two.